Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add HTML output for stac-api #17

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

vincentsarago
Copy link
Member

This PR add HTML output to all STAC API endpoints (~same HTML output as tipg endpoints)

Screenshot 2025-01-18 at 4 29 16 PM Screenshot 2025-01-18 at 4 29 24 PM Screenshot 2025-01-18 at 4 29 33 PM Screenshot 2025-01-18 at 4 29 49 PM Screenshot 2025-01-18 at 4 29 59 PM Screenshot 2025-01-18 at 4 30 57 PM

@vincentsarago vincentsarago force-pushed the feature/add-stac-HTML-output branch from f5673d9 to cc76952 Compare February 8, 2025 21:05
@vincentsarago vincentsarago marked this pull request as ready for review February 8, 2025 21:06
200: {
"content": {
MimeTypes.json.value: {},
MimeTypes.html.value: {},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a shame but we almost need a custom StacApi class just to add the response content 🤷‍♂️

model_name="ItemUri",
base_model=ItemUri,
extensions=[HTMLorGeoOutputExtension()],
request_type="GET",
Copy link
Member Author

@vincentsarago vincentsarago Feb 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: in subsequent PR we will add more output type support (e.g GeoParquet)

self.client.get_queryables, HTMLorSchemaGetRequest
),
)
app.include_router(self.router, tags=["Filter Extension"])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need custom Filter extension client because we need to configure output models

@vincentsarago vincentsarago requested a review from hrodmn February 9, 2025 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant